from flask import Flask, Blueprint,render_template
from apps.modules.admin.views.sys import sys_bp,register_sys_bps
from apps.modules.admin.views.cms import cms_bp,register_cms_bps
from apps.modules.admin.views.sys.index import index_bp
# 创建admin
admin_bp = Blueprint('admin',
                     __name__,
                     url_prefix='/admin',
                     template_folder='templates',
                     static_folder='static')


def register_admin_bps(app: Flask):
    admin_bp.register_blueprint(sys_bp)
    register_sys_bps(app)
    admin_bp.register_blueprint(cms_bp)
    register_cms_bps(app)

    admin_bp.register_blueprint(index_bp)
    # 注册系统级蓝图
    app.register_blueprint(admin_bp)

